<?php

/**
 * @file
 * Prepend the devel menu to Simplemenu.
 */

/**
 * Implementation of hook_simplemenu_tree_alter()
 */
function simplemenu_devel_simplemenu_tree_alter(&$tree) {
  if (user_access('access devel information')) {
    $devel = array(
      'link' => array(
        'mlid' => 0,
        'menu_name' => 'devel',
        'hidden' => FALSE,
        'access' => TRUE,
        'title' => t('Devel module'),
        'href' => 'admin/settings/devel',
        'in_active_trail' => FALSE,
        'has_children' => TRUE,
        'localized_options' => array(
          'attributes' => array('id' => 'simplemenu_devel'),
        ),
      ),
      'below' => simplemenu_menu_tree('devel:0'),
    );
    array_unshift($tree, $devel);
  }
}

// vim: ts=2 sw=2 et syntax=php
